﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using hedefgrup.reports.common;

public partial class dl : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.ClearContent();
        Response.ClearHeaders();
        Response.Buffer = true;
        Response.Charset = "";
        Response.ContentType = "application/vnd.ms-excel";
        Response.AddHeader("content-disposition", "attachment; filename=" + Request.QueryString.ToString());

        Response.BinaryWrite(File.ReadAllBytes(Path.Combine(Report_VerbatimByCode.OutputPath, Request.QueryString.ToString())));

        File.Delete(Path.Combine(Report_VerbatimByCode.OutputPath, Request.QueryString.ToString()));
    }
}